﻿using System.ComponentModel;

namespace CSNN.GUI
{
    /// <summary>
    /// Обозреваемый класс счетчика нейронов в слое сети для DataGrid
    /// </summary>
    public class NewImage : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        /// <summary>
        /// Содержание образа
        /// </summary>
        private int _unit;

        /// <summary>
        /// Описание Вход/Выход
        /// </summary>
        private string _inout;

        /// <summary>
        /// Конструктор
        /// </summary>
        /// <param name="Value"></param>
        /// <param name="inout"></param>
        public NewImage(int Value, string inout)
        {
            this._unit = Value;
            this._inout = inout;
        }

        /*/// <summary>
        /// Элемент описания для DataGrid
        /// </summary>
        public string Num
        {
            get { return _inout; }
            private set { }
        }*/

        /// <summary>
        /// Элемент образа для DataGrid
        /// </summary>
        public int Unit
        {
            get { return _unit; }
            set
            {
                _unit = value;
                this.NotifyPropertyChanged("Unit");
            }
        }
        
        private void NotifyPropertyChanged(string name)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(name));
        }

    }
}
